#!/usr/bin/env node
/*
 * @Description: 发起请求
 * @Author: yiling (315800015@qq.com)
 * @Date: 2021-05-20 18:59:52
 * @LastEditors: yiling (315800015@qq.com)
 * @LastEditTime: 2021-05-20 19:26:45
 * @FilePath: \v3-mini\openDevTools\http.js
 */
// const axios = require('axios')
// console.log('axios=', axios)
const url = 'https://preapi.zonmind.com/api/homeshow/base_info?platform_id=1&business_id=1'
// axios
//   .get(url)
//   .then((response) => {
//     console.log('response=', response.data)
//   })
//   .catch((error) => {
//     console.log('失败', error)
//   })

const request = require('request')

request(url, { json: true }, (err, res, body) => {
  if (err) {
    return console.log('err', err)
  }
  console.log('res=', res)
  console.log('成功==', body.data)
  if (body.code === 200) {
    // body.data.settings
  }
})
